<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <link rel="stylesheet" href="bind.css">
</head>
<body>
<div id="app">

  <h2 :class="active">{{message}}</h2>

  <h2 v-bind:class="{active:isActive,line:isline}">{{message}}</h2>

  <h2 :class="getClasses()">{{message}}</h2>

  <button v-on:click="btnClick">按钮</button>
</div>
  <script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el:'#app',
    data:{
      message:"message",
      isActive:true,
      isline:true

    },
    methods:{
      btnClick:function (){
        this.isActive = !this.isActive;
      },
      getClasses:function (){
        return {active:this.isActive,line:this.isline};
      }

    }

  })
</script>

</body>
</html>